Catch multiple exceptions at once c